Expanding variable sub-column widths as needed to store data in memory

ABSTRACT

A set of data storage values is received. It is determined that a data storage value in the set will not fit in an available memory segment including variable data column widths based at least in part on data sizes specified in a plurality of segment layout maps. A memory segment is selected for which a column width of a column will be expanded. A column width of the selected memory segment is expanded. A segment layout map corresponding to the selected memory segment is updated. The set of data storage values is stored in the selected memory segment.

CROSS REFERENCE TO OTHER APPLICATIONS

This application is a continuation of co-pending U.S. patent applicationSer. No. 14/681,478 entitled EXPANDING VARIABLE SUB-COLUMN WIDTHS ASNEEDED TO STORE DATA IN MEMORY filed Apr. 8, 2015, which claims priorityto U.S. Provisional Patent Application No. 62/082,558, entitled STORINGDATA VALUES filed Nov. 20, 2014 which is incorporated herein byreference for all purposes.

BACKGROUND OF THE INVENTION

Existing memory systems tend to store data values in a way that usesmore space than is necessary, especially when memory is allocatedstatically. In current systems, memory size is allocated for the largestpossible value of a given data item. It would be useful if a scheme forstoring data values could be developed that would make more efficientuse of available memory.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of the invention are disclosed in the followingdetailed description and the accompanying drawings.

FIG. 1 is a block diagram illustrating embodiments of a system to reducememory usage in storing data values.

FIG. 2 is a flowchart illustrating embodiments of a process of storingdata values.

FIG. 3 is a diagram illustrating embodiments of a typical memorysegment.

FIG. 4 is a diagram illustrating embodiments of a memory segment.

FIG. 5 is a diagram illustrating embodiments of a memory segment.

FIG. 6 is a diagram illustrating embodiments of a memory segment layoutmap.

FIG. 7 is a block diagram illustrating embodiments of storing datavalues.

FIG. 8 is a flowchart illustrating embodiments of a process to splitmemory segments.

FIG. 9 is a flowchart illustrating embodiments of a process to split andcombine memory segments.

FIG. 10 is a diagram illustrating embodiments of splitting and combiningmemory segments.

FIG. 11A is a table illustrating embodiments of splitting memorysegments.

FIG. 11B is a table illustrating embodiments of splitting memorysegments.

FIG. 12 is a flowchart illustrating embodiments of a process ofsplitting a memory segment into multiple memory segments.

DETAILED DESCRIPTION

The invention can be implemented in numerous ways, including as aprocess; an apparatus; a system; a composition of matter; a computerprogram product embodied on a computer readable storage medium; and/or aprocessor, such as a processor configured to execute instructions storedon and/or provided by a memory coupled to the processor. In thisspecification, these implementations, or any other form that theinvention may take, may be referred to as techniques. In general, theorder of the steps of disclosed processes may be altered within thescope of the invention. Unless stated otherwise, a component such as aprocessor or a memory described as being configured to perform a taskmay be implemented as a general component that is temporarily configuredto perform the task at a given time or a specific component that ismanufactured to perform the task. As used herein, the term ‘processor’refers to one or more devices, circuits, and/or processing coresconfigured to process data, such as computer program instructions.

A detailed description of one or more embodiments of the invention isprovided below along with accompanying figures that illustrate theprinciples of the invention. The invention is described in connectionwith such embodiments, but the invention is not limited to anyembodiment. The scope of the invention is limited only by the claims andthe invention encompasses numerous alternatives, modifications andequivalents. Numerous specific details are set forth in the followingdescription in order to provide a thorough understanding of theinvention. These details are provided for the purpose of example and theinvention may be practiced according to the claims without some or allof these specific details. For the purpose of clarity, technicalmaterial that is known in the technical fields related to the inventionhas not been described in detail so that the invention is notunnecessarily obscured.

Reducing memory usage in storing data values is disclosed. In variousembodiments, a memory structure includes one or more memory segments.The memory segments each include vectors of data storage values. A setof data storage values is stored in one or more vectors occupying a rowof the memory segment. The vectors in a row are arranged into columns.The columns are multiplexed to include multiple sub-columns. Intraditional memory storage systems, memory segments include columnsand/or sub-columns of fixed width. Typically, the width of a column isdetermined upon generation of the memory segment.

Memory segments disclosed herein in various embodiments include columnsand/or sub-columns of variable size. The width of columns and/orsub-columns may be expanded or contracted. For example, as data valuesare added to the memory segment, columns and/or sub-columns are expanded(if necessary) to accommodate the size of the added data storage values.Because the column widths in a memory segment are variable, the memorysegment need not be generated with columns and/or sub-columns largeenough to store any possible data storage value. Rather, the memorysegment may grow in capacity as larger data values are added to thesegment. A memory segment according to various embodiments is thereforeto be generated with minimal capacity and is expanded by only the amountnecessary to accommodate the size of data storage values sought to bestored in the segment. Using the techniques disclosed herein, thedensity of data storage is increased relative to a typical memorysegment. And as a result, the cost of memory storage is reduced and theefficiency of the memory increased relative to a memory system includingtypical memory segments.

According to some embodiments, a segment layout map includes informationused to locate data storage values in a memory segment. The segmentlayout map is to be updated as the locations of data values change overtime. Locations of data values may change as a result of, for example,column width expansion, data value rearrangement, and/or otheroperations.

In various embodiments, a set of data storage values is received. It isdetermined that a data storage value in the set will not fit in anavailable memory segment including variable data column widths based atleast in part on data sizes specified in a plurality of segment layoutmaps. A memory segment is selected for which a column width of a columnwill be expanded. A column width of the selected memory segment isexpanded. A segment layout map corresponding to the selected memorysegment is updated. The set of data storage values is stored in theselected memory segment.

FIG. 1 is a block diagram illustrating embodiments of a system to reducememory usage in storing data values. In the example shown, a datastorage system 100 includes a client device 102, a network 104, a server106, and/or memory 108. The client device 102 may include, for example,a personal computer, laptop, mobile device, a server, and/or any othertype of computing device. The client device 102 provides data to and/orreceives data from the server 106 and/or memory 108 via a network 104.The network 104 may include, for example, a high speed data network,telecommunications network, and/or any other type of network. The server106 communicates with the memory 108 to store data in the memory 108and/or retrieve data from memory 108.

In various embodiments, the memory 108 includes one or more memorysegments 110. A memory segment 110 may include vectors of integers,arrays, and/or other data structures arranged into columns of variablewidth. The columns may include sub-columns of variable width. And eachcolumn and/or sub-column may be associated with a type of data. Vectorsincluding one or more fields of data may occupy rows in a column of thememory segment 110. A vector of storage data values may include datacorresponding to one or more data fields, and each field may occupy arange of elements in the vector. The range of elements may correspond tothe width of a column and/or a sub-column within the column.

In various embodiments, memory segments 110 are associated with segmentlayout maps 112. For example, each of one or more memory segments 110 isassociated with a memory segment layout map 112. In various embodiments,a segment layout map 112 includes a data structure separate from amemory segment 110 to which the segment layout map 112 corresponds. Insome embodiments, a segment layout map 112 includes an array, table,matrix, and/or other data structure including index informationassociated with various data fields of a segment 110. In one example, asegment layout map 112 includes data field identifiers and correspondingcolumn identifiers, offset values, mask values, and/or otherinformation. For example, the segment layout map 112 may include vectorsincluding field identifiers, column identifiers, offset values, masksizes, and/or other information. In some embodiments, a segment layoutmap 112 is included in a memory segment 110 to which the segment layoutmap 112 corresponds.

According to various embodiments, a server 106 receives data storagevalues from a client 102, and the data storage values are stored inmemory segments 110 included in the memory 108. Data storage values mayinclude any type of data. For example, in a database storing surveydata, data storage values may include user age, income, zip code, phonenumber, survey answers, survey status indicating whether the user hascompleted the survey, a time the user takes to answer the survey, and/orany other data. Each of these categories of data storage values may beassociated with a field identifier that denotes a type of fieldassociated with the category. The field identifier includes a value thatmaps to a type of data field. In some embodiments, when a data storagevalue is received, the server 106 determines a storage location for thedata storage value. For example, the server 106 determines a memorysegment 110 in which the data value is to be stored. To select a memorysegment 110 in which to store the value, the server 106 determines afield identifier associated with the data storage value and/or a sizeassociated with the data storage value. The field identifier is used tolook up columns and/or sub-columns including data of a type associatedwith the data storage value. The data storage value size is compared tomask size and/or other column size information for each of the columnsand/or sub-columns. In various embodiments, a “mask” with respect to acolumn or a sub-column refers to the maximum storage size (e.g., inbits) associated with that column or sub-column. In some cases, a memorysegment 110 is selected that includes a column and/or sub-column largeenough to accommodate the data storage value without expansion. A columnand/or sub-column large enough to accommodate the data storage value mayinclude a column that includes enough bits to store the value. A columnand/or sub-column, in some embodiments, includes enough bits to storethe data value if a mask associated with the column and/or sub-columnincludes at least as many bits as the data storage value. When a segmentis identified that includes a column and/or sub-column large enough toaccommodate the data storage values, the values are added to thesegment. For example, one or more vectors including the data storagevalues are added to the segment as a row.

In some embodiments, it is determined that a data storage value in a setof values will not fit in any available memory segments 110. Forexample, it may be determined that the size of the data storage value isgreater than any of the columns and/or sub-columns in any of thesegments 110 in a memory 108. In this case, a memory segment 110 isselected, and a column and/or sub-column width of the memory segment 110is expanded to accommodate the data storage value. The column width isexpanded by increasing the number of bits stored in the column. In oneexample, a memory segment 110 that would require the least column and/orsub-column width expansion is selected, and the column and/or sub-columnwidth of the selected memory segment 110 is expanded. In someembodiments, expanding a column and/or sub-column may include increasinga size of a mask associated with the column and/or sub-column.

In some embodiments, a segment layout map 112 is used to locate datastorage values in a memory segment. Data included in a segment layoutmap 112 may be used to generate a pointer to a data storage value in amemory segment 110 corresponding to the segment layout map 112. In somecases, a query is generated by looking up information included in asegment layout map 112. In one example, server 106 may receive a requestto retrieve data storage values including a zip code for a specificindividual John Smith. The request may include information identifyingthe data field “zip code” and information identifying the individualJohn Smith. The server 106 may generate a query to retrieve the datastorage values including John Smith's zip code from a segment 110 inwhich the values are stored. The server 106 may, for example, identify asegment 110 in which the data values associated with the user John Smithare stored and/or determine a field identifier associated with the datafield “zip code.” The field identifier may be used to look up a columnindex, offset value, mask value, and/or other information used to locatethe zip code data storage value in the segment 110. A query is generatedincluding the column index, row index associated with John Smith, theoffset value, the mask value, and/or other information. The query isexecuted to retrieve John Smith's zip code from the memory segment 110.

FIG. 2 is a flowchart illustrating embodiments of a process of storingdata values. In various embodiments, the process 200 is performed atserver 106 of FIG. 1. The techniques disclosed herein in variousembodiments are described in the context of examples related to storing,retrieving, and/or otherwise processing data associated with individualsand/or user profiles. The techniques disclosed herein are, however, notlimited to this context and are broadly applicable to all types of dataas used in a wide variety of contexts.

At 210, a set of data storage values is received. The set of datastorage values may be received at, for example, a server, client, and/oranother node. A set of data storage values includes one or more datastorage values. A data storage value may include any type of data. Forexample, a data storage value may include binary values, numbers,strings, and/or any other type of data value. In some embodiments, datastorage values are processed to convert the values to a proper formatfor storage. For example, a base-10 integer may be converted to a binaryinteger, a string may be converted to one or more binary integers,and/or other data processing operations may be performed.

In one example, a set of data storage values includes data storagevalues associated with an individual. Data storage values associatedwith an individual may include, for example, the person's name, address,zip code, phone number, income, survey answers, number of days since anevent, and/or any other data associated with the individual. A set ofdata storage values may include one or more data storage values receivedfrom a client device. Upon receipt, the set of data storage values isprocessed for storage in memory.

At 220, it is determined that a data storage value in the set does notfit in an available memory segment including variable column widths. Invarious embodiments, a determination that the data storage value doesnot fit is made based at least in part on data sizes specified in aplurality of segment layout maps.

In some embodiments, a data storage value in a set of data storagevalues is compared to column size information specified in a segmentlayout map associated with a memory segment to determine whether columnsin a memory segment can accommodate the data storage value withoutexpansion. For example, a size of a data storage value is determined,and the size is compared to column size information included in thesegment layout map. The size of a data storage value may include anumber of bits, bytes, and/or other amount of storage necessary to storethe data storage value. A number of bits, bytes, and/or other units ofinformation that a column and/or sub-column can accommodate may bedetermined based on a mask associated with the column and/or sub-column.To compare the data storage value to an appropriate column in a memorysegment, a field identifier associated with the data storage value isdetermined. The field identifier is used to look up in a segment layoutmap column(s) and/or sub-column(s) in a memory segment that store dataassociated with the field identifier. The data storage value is comparedto the column(s) and/or sub-column(s) to determine whether the column(s)and/or sub-column(s) are large enough to accommodate the data storagevalue. In some cases, a field identifier is used to look up a mask sizeassociated with the column(s) and/or sub-column(s). In the event thatthe mask size and/or column size is greater than or equal to the numberof bits associated with the data storage value, it may be determinedthat the data storage value can be stored in the memory segment. In theevent that the mask size and/or column size is less than the number ofbits associated with the data storage value, it may be determined thatthe data storage value cannot be stored in the memory segment withoutcolumn width expansion.

In various embodiments, this process is repeated for all memory segmentsof a memory. For example, a data storage value is compared to columnwidth information included in multiple segment layout maps eachassociated with one of multiple available memory segments. In somecases, it is determined that no available memory segment includes acolumn storing data of the same type as the data storage value that islarge enough to accommodate the data storage value.

By way of example, a data storage value including a user's age—85 yearsold—requires a column and/or sub-column width of seven (7) bits to storethe binary number 1010101₂. In this case, segment layout maps associatedwith each of the available memory segments in a memory are queried todetermine whether a memory segment includes a user age field with acolumn width of at least seven (7) bits. Based on the query of thesegment layout maps, it may be determined that the data storage valueincluding the user's age—1010101₂—will not fit in any available memorysegment. In this case, it is determined that no memory segment includesa user age column and/or sub-column including seven (7) or more bits.

At 230, a memory segment for which a column width will be expanded isselected. In various embodiments, a memory segment is selected from aplurality of memory segments. The selected memory segment includes, forexample, a memory segment with a column and/or sub-column including dataof the type associated with the data storage value. In one example, adata storage value includes a user's age, and in this case, a memorysegment including at least a column and/or sub-column storing user agedata values is selected. In various embodiments, the set of data storagevalues includes multiple data storage values, and each of the datastorage values is associated with a data field type as denoted by afield identifier. In some cases, a memory segment is selected thatincludes columns and/or sub-columns associated with each of the datafield types included in a set of data storage values.

In some embodiments, a memory segment that would require a leastexpansion is selected. For example, a data storage value including auser's yearly income of $50,000 requires 16 bits of storage. A firstmemory segment includes a yearly income sub-column with a 10-bit maskindicating, for example, that the sub-column can store values up to 10bits. A second memory segment includes a yearly income column with a14-bit mask. And a third memory segment includes a yearly income columnwith an 8-bit mask. In this case, the second memory segment is selectedas it would require an expansion of two (2) bits to accommodate the datastorage value—the user's yearly income of $50,000 occupying 16 bits ofstorage. The two (2) bit expansion is the least expansion of the threememory segments because the first memory segment would require a columnexpansion of six (6) bits and the third memory segment would require acolumn expansion of eight (8) bits to store the 16-bit data storagevalue.

At 240, a column width of the memory segment is expanded. In variousembodiments, the column width of the selected memory segment is expandedby increasing the column width to accommodate the additional bitsnecessary to store the data storage value. A column may include one ormore rows of vectors each of which may be expandable to store up to 32bits and/or another amount of information. A column may include one ormore sub-columns. A vector occupies an entire width of a column whilevarious ranges of elements within the vector occupy sub-columns of thecolumn. In some cases, an entire column is associated with a data fieldcorresponding to a field identifier. Each of the vectors included inthat column includes data storage values associated with the data field.Continuing with the example above, the selected column includes 14 bitsand the column stores user income data. To store the 16-bit data storagevalue, the user's income of $50,000, the column is expanded by two (2)bits.

In some embodiments, a column includes multiple sub-columns, and eachsub-column is associated with a data field. In this case, the size ofthe selected memory segment is expanded by increasing a width of asub-column and, possibly as a result, a column including the sub-column.In one example, a column is 28 bits wide and includes rows of vectorsincluding 28 elements. The vectors including 28 elements are configuredto store 28 bits of information. The column includes three (3)sub-columns. A first sub-column occupies elements 0-6 of the column, asecond sub-column occupies elements 7-20, and a third sub-columnoccupies elements 21-27. The memory segment including the column storessurvey-related data. The first sub-column includes data valuesindicating days since a user's last login, the second sub-columnincludes data values indicating user income, and the third sub-columnincludes user age data. Returning to the example above, in order toaccommodate the 16-bit data storage value including a user's income of$50,000, the second sub-column is expanded from 14 bits occupyingelements 7-20 to 16 bits. When expanded to 16 bits, the secondsub-column occupies elements 7-22 of the column, the third sub-column isshifted to occupy elements 23-29, and the column is expanded to include30 bits.

In various embodiments, a mask associated with the expanded columnand/or sub-column is updated. A mask is updated to match the number ofelements in an expanded column and/or sub-column. Continuing with theexample, the second sub-column width is increased from 14 bits to 16bits. Prior to expansion, the mask for the sub-column included a 14-bitmask, and after expansion of the sub-column includes a 16-bit mask.

In various embodiments, expansion of a sub-column results in a columnexceeding a maximum allowable column width. In some embodiments, themaximum allowable column width may include 32 bits. In some embodiments,the maximum allowable column width may be a number of bits other than 32bits, such as, for example, 64 bits. In some embodiments, the maximumallowable column width may be any predetermined number of bits. In thiscase, the expanded sub-column is moved to another column (if available)in the memory segment. For example, all values included in the vectorsstored in the expanded sub-column are moved to another column that hasthe capacity to store the expanded sub-column.

At 250, a segment layout map corresponding to the memory segment isupdated. In various embodiments, a segment layout map corresponding to amemory segment is updated based on the column width expansion. A segmentlayout map may include a data structure comprising field identifiers,column identifiers, offset values, mask values, and/or other informationused to determine memory storage locations of data storage values. Afield identifier may be associated with data field type. The segmentlayout map may map field identifiers to corresponding columnidentifiers, offset values, and mask sizes. A column identifier includesan index to a certain column with a memory segment. A row identifier anda column identifier point to a vector within a memory segment. An offsetvalue and mask value are used to extract a data storage value from thevector. The offset value indicates, for example, a number of elements bywhich to right-shift the vector. The mask includes a value to becombined with the right-shifted vector in order to extract the desireddata storage value. The process of retrieving data storage values from amemory segment is discussed in further detail below.

In various embodiments, column-width expansion causes the location ofdata storage values in a memory segment to change. A segment layout mapcorresponding to the memory segment is updated to reflect the changes.Continuing with the sub-column expansion example above, the firstsub-column is associated with a field identifier 0, the secondsub-column is associated with a field identifier 1, and the thirdsub-column is associated with a field identifier 2. As discussed above,the second sub-column is expanded from occupying elements 7-20 tooccupying elements 7-22 and the third column is shifted from occupyingelements 21-27 to occupying elements 23-29. In this case, a segmentlayout map is updated by increasing a mask value associated with thefield identifier 1 from 14 bits (0x3FFF) to 16 bits (0xFFFF). Thesegment layout map is also updated by increasing the offset valueassociated with field identifier 2, which corresponds to the thirdsub-column, from 21 to 23.

At 260, the set of data storage values is stored in the memory segment.In various embodiments, the set of data storage values is stored in thememory segment by adding the data storage values to one or more vectorsand adding the vectors as rows in the memory segment. For example, thedata storage value that a column and/or sub-column was expanded toaccommodate is stored in the expanded column and/or sub-column. Otherdata storage values in the set are stored in the other columns and/orsub-columns of the memory segment. In some cases, the memory segmentselected for column width expansion includes columns and/or sub-columnscorresponding to each of the one or more data field types associatedwith the data storage values. In this case, each of the data storagevalues is stored in an appropriate column and/or sub-columncorresponding to the field identifier of the data storage value. Tostore data storage values in appropriate columns, the data storagevalues are arranged into vectors and the vectors added to a row of thememory segment. In one example, a set of data storage values for a userincludes an age value of 24, an income value of $50,000, and a zip codevalue of 12345. Using the techniques disclosed herein, a user incomesub-column of a selected memory segment is expanded to 16 bits toaccommodate the received user income value $50,000. The user incomevalue is stored in the expanded sub-column as the binary value1100001101010000₂ or hexadecimal value 0xC350. The user age value of 24may be stored as the binary value 11000₂ or hexadecimal value Ox18 in asub-column associated with the user age field identifier. The zip code12345 is stored as the binary value 11000000111001₂ or hexadecimal value0x3039 in a sub-column associated with the zip code field identifier.

In some embodiments, a set of data storage values includes data storagevalues associated with a person for which data is already stored in thememory segment. In this case, a column associated with the received datastorage value is expanded using the techniques disclosed herein, and thedata storage values are added to an existing row of the memory segmentincluding data for that person. For example, the data storage values inthe set may be added to existing vectors in the appropriate row, column,and/or sub-column locations.

FIG. 3 is a diagram illustrating embodiments of a typical memorysegment. In the example shown, a typical memory segment 300 includescolumns 310 and sub-columns of fixed size. The columns 310 include oneor more rows 320 of vectors. A first column 312 includes a fixed widthincluding 32 bits of storage, and each row 320 in the first columnincludes a vector including 32 elements. The first column 312 includesfour sub-columns, and the sub-columns are fixed in width. A firstsub-column 314 includes a fixed width of eight (8) bits and occupieselements 0 thru 7 of the first column 312. A second sub-column 316includes a fixed width of eight (8) bits occupying elements 8 thru 15 ofthe first column 312. Two additional sub-columns may occupy theremaining elements 16 to 25 and 26 to 31. In various embodiments, thesize of the columns 310 and/or sub-columns are defined and/or fixed atthe time the memory segment 300 is generated. For example, a user maydefine the column and/or sub-column sizes when the memory segment 300 isgenerated. Because the column and/or sub-column sizes cannot be expandedin the typical memory segment 300, a user may be inclined toconservatively overestimate the amount of storage allocated for certaindata fields so that any foreseeable data storage values can be stored inthe segment 300. By way of example, a column width is defined for a datafield type that is difficult to predict including, for example, daysbetween receipt of a survey and completion of the survey. In this case,most of the values will likely be in the range of 0 to 100 days. Itwould require a maximum seven (7) bits of storage to store each of thevalues in the range of 0 to 100. A user defining a column to store thesevalues may, however, conservatively allocate enough storage space forvalues up to 1,000 days so that the memory segment 300 will be able tostore any potential values without error. To store all values in therange of 0 to 1000, 17 bits may be allocated. Given that a vastmajority, if not all, of the values received may fall within the 0 to100 day range, allocating 10 extra bits—17 bits as opposed to seven (7)bits—of storage results in considerable underutilized and/or wastedspace in the memory segment 300. Wasted and/or underutilized spaceincreases the cost of memory as more segments will need to be generatedand more storage space will need to be purchased. Generating more memorysegments also reduces the speed of data storage and/or retrieval fromthe memory segments in memory.

FIG. 4 is a diagram illustrating embodiments of a memory segment. In theexample shown, a memory segment 400 includes columns 410 and/orsub-columns of variable width. The columns 410 include one or more rows420 of vectors. Columns 410 may be multiplexed to include sub-columns.The columns 410 and/or sub-columns as depicted in FIG. 4 are shown withdashed lines to indicate that the widths of the columns and/orsub-columns are variable. For example, the columns 410 and/orsub-columns of memory segment 400 may be expanded as needed toaccommodate new data storage values. In some embodiments, the columns410 are fixed in width while the width of sub-columns included in acolumn are variable in width.

In various embodiments, a memory segment 400 is generated with no data.In this initial state (not shown), the columns 410 in memory segment 400include zero (0) elements. In certain cases, each of the one or morecolumns 410 and/or sub-columns in memory segment 400 is associated witha data field type when the memory segment 400 is initialized. In othercases, columns 410 and/or sub-columns are assigned to data field typesas data storage values are received and stored in the memory segment400.

The memory segment 400 depicted in various embodiments in FIG. 4includes an available memory segment at a time after initialization. Inthe example shown, a first column 412 includes a width of 28 bits. Thefirst column 412 includes a storage column, and the storage column ismultiplexed to include three sub-columns. Each of the three sub-columnsis associated with a field identifier, and the field identifier denotesa data field type associated with the sub-column. A first sub-column 414includes eight (8) bits occupying elements zero (0) thru seven (7) ofthe first column 412, and the first sub-column 414 is associated with afirst data field—user age. A second sub-column 416 includes eight (8)bits occupying elements eight (8) thru 15 of the first column 412, andthe second sub-column 416 is associated with a second data field—userrating of a restaurant on a scale of 0 to 100. A third sub-column 418includes 12 bits occupying elements 16 thru 27 of the first column 412,and the third sub-column 418 is associated with a third data field—userincome. In various embodiments, a set of data storage values including auser age value 30, a user's rating of a restaurant value of 78, and auser's income value $60,000 is received. Using the techniques disclosedherein in various embodiments, the memory segment 400 is selected forexpansion. For example, it may be determined that field identifiersassociated with the data storage values in the received set match fieldidentifiers associated with columns and/or sub-columns of the memorysegment 400. To accommodate the user income value of $60,000, the thirdsub-column 418 is expanded. For example, the third sub-column 418 isexpanded from a capacity of 12 bits to 16 bits. To accommodate the thirdsub-column 418 expansion, the first column 412 is expanded from acapacity of 28 bits to a capacity of 32 bits. Once expanded, the thirdsub-column 418 occupies elements 16 thru 31 of the first column 412. Thereceived set of data storage values is stored in the memory segment 400,and a segment layout map associated with the memory segment 400 isupdated.

In various embodiments, expansion of a sub-column results in a columnexceeding a maximum permissible column width. For example, a maximumallowable column width for a memory segment may include 32 bits oranother value. In the case that expansion of the sub-column would exceeda max allowable column width, the expanded sub-column is moved toanother column (if available) in the memory segment. For example, allvalues included in the vectors stored in the expanded sub-column arecopied to a destination column, which has the capacity to store theexpanded sub-column. In certain cases, a destination column is selectedto minimize the amount of data moved within a memory segment. In oneexample, an optimal bit packing is calculated, and a destination columnis selected based on the optimal bit packing so that moving thesub-column to the destination column uses the least amount of bitspossible. In various embodiments, a copy and/or move command isgenerated, compiled, and/or executed to move the sub-column data to thedestination column. By way of example, if a user income value of$100,000 is received, the third sub-column 418 would need to be expandedfrom a capacity of 12 bits to 17 bits and the first column 412 expandedfrom a capacity of 28 bits to 33 bits. In certain cases, this wouldexceed the 32-bit maximum capacity of the first column 412. The valuesstored in the third sub-column 418 are therefore transferred to anothercolumn that has the capacity to accommodate a 17 bit sub-column.

FIG. 5 is a diagram illustrating embodiments of a memory segment. In theexample shown, a memory segment 500 includes multiple columns. Themultiple columns include, for example, a zeroth column 510, a firstcolumn 512, and so on up to an Nth column 514. Each of the one or morecolumns includes rows of vectors. For example, the zeroth column 510includes a zeroth vector 520, a first vector 522, and so on up to an Mthvector 524. The vectors in the zeroth column 510 include three datastorage values. In one example, a first data field includes valuesindicating a status associated with a user profile (e-status). The firstdata field is associated with a first field identifier 530. The seconddata field includes user age values, and the second data field isassociated with a second field identifier 532. A third data fieldincludes user income values, and the third data field is associated witha third field identifier 534. The zeroth vector 520 in the zeroth columnincludes e-status, user age, and user income data storage valuesassociated with a first user profile, the first vector 522 includes datastorage values associated with a second user profile, and so on up tothe Mth vector 524 including data storage values associated with an Mthuser profile. The vectors in the first column 512 include two datastorage values. In one example, a fourth data field includes a number ofdays (k-days) between survey receipt and completion. The fourth datafield is associated with a fourth field identifier 536. A fifth datafield includes zip code, and the fifth data field is associated with afifth field identifier 538. A zeroth vector 540 in the first columnincludes k-days and zip code data storage values associated with thefirst profile, a first vector 542 in the first column includes datastorage values associated with the second profile, and so on up to anMth vector 544 in the first column including data storage valuesassociated with the Mth profile.

In various embodiments, each of one or more vectors in a row includesdata storage values associated with a same user and/or user profile. Forexample, the zeroth vector 520 in the zeroth column, the zeroth vector540 in the first column, and so on up to the zeroth vector 550 in theNth column may include, for example, data associated with a same userprofile. In some embodiments, however, the vectors in a row include datastorage values associated with different users and/or user profiles.

FIG. 6 is a diagram illustrating embodiments of a memory segment layoutmap. In various embodiments, segment layout map 600 corresponds to thememory segment 500 of FIG. 5. The segment layout map 600 includes fieldidentifiers 610, column identifiers 620, offset values 630, mask values640, and/or other information. In the segment layout map 600, each ofone or more field identifiers maps to a column, an offset value, a mask,and/or other information usable to locate and/or retrieve dataassociated with the field identifier.

In some embodiments, a set of data storage values is received and it isdetermined based on the segment layout map 600 whether the data storagevalues in the set can be stored in a memory segment corresponding to thesegment layout map 600. For example, a set of data storage values may beprocessed to determine field type, size, and/or other attributesassociated with each of the data storage values. A field identifierassociated with a data storage value is used to look up a mask value inthe segment layout map 600 that corresponds to the field identifier. Thesize of the data storage value is compared to the mask size and/or otherdata storage size-indicative information. In the event the size of thedata storage value is less than or equal to the mask size, it isdetermined that the memory segment can accommodate the data storagevalue. In the event the data storage value is larger than the mask size,it is determined that the memory segment cannot accommodate the datastorage value. This technique may be repeated for multiple data storagevalues in the set to determine whether the memory segment canaccommodate the set of data storage values.

According to some embodiments, these techniques are repeated acrossmultiple memory segments to determine whether the data storage valuescan be stored in any of multiple memory segments. In the event it isdetermined that a memory segment can accommodate a set of data storagevalues, the data storage values are stored in the segment and theprocess may end. In the event it is determined that the set of datastorage values will not fit in any available memory segment, a memorysegment is selected for expansion using the techniques disclosed herein.

In various embodiments, code 650 is generated to query, retrieve,locate, store, copy, move, and/or otherwise process data in a memorysegment. A system (for example, server 106 of FIG. 1) may generate,compile, and/or execute the code 650. Code 650 is generated based ondata from a segment layout map 600. The code 650 includes a pointer to aportion of a data segment. The portion of the data segment includes oneor more data storage values. In one example, the code 650 receives asinput a column identifier, a row identifier, an offset, and/or a mask.The column identifier and row identifier point to a certain vectorlocated at the identified column and row. The offset value defines abitwise operation to right shift the bits of the vector by the offsetvalue. The right-shift operation is denoted by the symbol “>>” in code650. For example, an offset value of 10 results in the data in a vectorbeing right-shifted by 10 bits. The mask value is then combined with theright-shifted bits in, for example, an “AND” operation to extract onlythe bits associated with a sub-column within the column. In some cases,right-shifting the bits in the vector by the offset value may align theleast significant bit of the data storage value with the leastsignificant bit of the mask. The mask when combined in an “AND”operation with bits in the vector will extract just the desired datastorage values. Code 650 includes one example command used to point toand/or otherwise process data storage values in a memory segment, andother commands and/or approaches may be used.

In some cases, a query 650 is generated by retrieving arguments from thesegment layout map 600. For example, a row and field identifier arereceived from a client. And the received field identifier is used toretrieve a column identifier, offset, mask, and/or other informationfrom the segment layout map 600. This retrieved information and the rowidentifier are used to generate, compile, and execute the query 650.

By way of example with reference to the memory segment of FIG. 5, arequest for the age of a user John Smith is received. It is determinedthat data for user John Smith is stored in Row 1 of the memory segment500. It is determined that the data field “user age” is associated withthe second field identifier in the segment layout map 600. Using thesegment layout map 600, the second field identifier is mapped to acolumn identifier of Column 0, an offset value 19, and a mask 0x7F. Thecolumn identifier, row, offset value, mask, and/or other information areused to generate the following example query:

data[column[2]][1]>>offset[2] & mask[2]

The query is executed to retrieve John Smith's age from the memorysegment 500. In the example query, the column identifier argument(column[2]) points to the zeroth column 510 of FIG. 5, and the rowargument ([1]) points to the first vector 522 in the zeroth column.Within the first vector 522 in the zeroth column, the offset valueargument (offset[2] or 19) right-shifts the values of the vector 522nineteen (19) positions to the beginning bit of the data storage valueindicating John Smith's age. The mask value (mask[2] and/or 0x7F) isapplied in an “AND” or other logical operation to extract just the seven(7) bits including the storage value indicating John Smith's age. Thestorage value indicating John Smith's age may occupy elements 19 to 25of the vector 522. Combining the mask value with right-shifted bits inan “AND” operation extracts elements 19 to 25 of the vector 522 whileremoving the data storage value included in elements 26 to 31.

FIG. 7 is a block diagram illustrating embodiments of storing datavalues. In various embodiments, a set of data storage values includingdata storage value 700 is received. It is determined whether the datastorage values in the set fit in any available memory segment. The makethis determination, the size of a data storage value 700 is compared toa size of an appropriate data field in a memory segment to determinewhether the data field can accommodate the data storage value. Forexample, a size of the data storage value 700 in bits may be compared toa mask size of a data field and/or sub-column. This process may berepeated for multiple memory segments. In various embodiments, it isdetermined that a data storage value 700 in a set will not fit in anyavailable memory segment. In the example shown, the data storage value700 includes a number of days since a last login value equal to 82 daysor 1010010₂. The data storage value 700 corresponds to a “last login”data field. The data storage value 700 includes seven (7) bits. Statedanother way, it may require seven (7) bits to store the data storagevalue 700. In some cases, a mask size of 0x7F or 1111111₂ would berequired to accommodate the data storage value 700. The seven (7) bitstorage size and/or 0x7F mask size required to store the data storagevalue 700 is to be compared to data sizes associated with “last login”data fields in multiple segments. The multiple segments include, forexample, a first segment 710, a second segment 720, and so on up to anNth segment 730. It is determined, for example, that the “last login”field and/or sub-column in the first segment 710 is associated with amask size 0x1F and/or can accommodate five (5) bits. Similarly, it isdetermined that a sub-column storing “last login” values in the secondsegment 720 is associated with a mask size of 0x3F and/or canaccommodate six (6) bits. It is determined that a “last login”sub-column of the Nth segment 730 is associated with a mask size of 0xFand/or can accommodate four (4) bits. In this case, none of theavailable memory segments can accommodate the data storage value 700,and one of the segments is selected for expansion. In some embodiments,a memory segment that would require a least expansion is selected. Forexample, a memory segment is selected that would result in the leastcolumn width expansion to accommodate the data storage value 700. Inthis case, the second memory segment 720 would require the least columnwidth expansion to store the data storage value 700. The “last login”sub-column of the second memory segment 720 would need to be expanded byone (1) bit from six (6) bits to seven (7) bits to accommodate the datastorage value 700, while the other segments would require greater columnwidth expansion. The second memory segment 720 is therefore selected forcolumn width expansion.

FIG. 8 is a flowchart illustrating embodiments of a process to splitmemory segments. In various embodiments, the process 800 is performed atserver 106 of FIG. 1. At 810, it is determined that a memory segment isfull. In various embodiments, a memory segment is full if an amount ofdata stored in the segment meets and/or exceeds a maximum storagecapacity of the segment. For example, a memory segment may be able tostore up to 65,000 rows of data and/or a certain number of columns eachincluding a maximum bit capacity. In the event that a segment includes65,000 rows, it is determined that the memory segment is full.

In various embodiments, a memory segment selected for storage of a setof data storage values is determined to be full. In one example, it isdetermined that a memory segment can store a set of data storage valueswithout column-width expansion. It may, however, be determined that theselected memory segment is full because it includes 65,000 rows ofvectors. In another example, a memory segment is selected forcolumn-width expansion using the techniques disclosed herein. And it isdetermined that the selected memory segment is full.

In some embodiments, it is determined that storing a set of data storagevalues in a memory segment would result in the segment being full. Forexample, it is determined that a memory segment could accommodate oneadditional row of data, but the addition of a set of data storage valuesto the memory segment would cause the memory segment to be full.

At 820, the memory segment is divided into one or more memory segments.In various embodiments, the memory segment is divided into multiplesegments using a clustering algorithm, genetic algorithm, randomselection, and/or any other approach. In one example, the memory segmentis divided into multiple child memory segments so that each of the childmemory segments includes data values of similar size. For example, afirst child memory segment may include larger data values while a secondchild memory segment includes smaller data storage values. Groupinglarger data values in one memory segment and smaller data values inanother memory segment may increase the speed and/or efficiency of thememory as a whole.

At 830, a set of data storage values is stored in one of the memorysegments. In various embodiments, a set of data storage values is storedin a memory segment generated in the dividing process. In one example, aparent memory segment is split into two child memory segments includinga first child segment and a second child segment. A set of received datastorage values includes three data values each associated with a fieldidentifier. The parent memory segment is divided such that the firstchild segment includes larger data values in one or more data fieldscorresponding to the three field identifiers, and the second childsegment includes smaller data values in the data fields. In the eventthe data storage values in the received set are closer in size to thoseof the first child segment, the set is stored in the first childsegment. In the event the data storage values in the received set arecloser in size to those of the second child segment, the set is storedin the second child segment.

In some embodiments, a segment is split into multiple child segments andone of the child segments is expanded to accommodate a set of datastorage values. For example, columns and/or sub-columns of the selectedchild memory segment are expanded to accommodate data storage values inthe set, and the set may be added to the selected child segment, forexample, upon completion of the column and/or sub-column expansion.

In various embodiments, a set of data storage values is added to thememory segment prior to division. For example, it may be determined thatadding a set of data storage values to a segment would fill the segmentbeyond capacity. In this case, the set of data storage values are addedto the segment, and the segment split after the data storage values havebeen added.

FIG. 9 is a flowchart illustrating embodiments of a process to split andcombine memory segments. In various embodiments, the process 900 isperformed at server 106 of FIG. 1. At 910, a memory segment is dividedinto one or more memory segments. In some cases, memory segments aredivided in response to a trigger event, periodically, at intervals, atpredetermined times, at random, on demand, and/or at any other time. Inone example, memory segments are divided periodically to optimize datastorage allocation across the multiple memory segments included in amemory. In some embodiments, memory segments are divided using aclustering algorithm, genetic algorithm, and/or other approaches togenerate memory segments including similarly sized data. As discussedbelow, a memory segment may be divided into two or more memory segmentssuch that one memory segment includes larger data values for one or morecolumns and/or sub-columns and another memory segment includes smallerdata values for the one or more columns and/or sub-columns. In certaincases, the memory segment including the larger data values includesfewer rows than the memory segment including smaller data values.Dividing the segments in this way balances the data storage used by eachof the two segments.

At 920, memory segments are combined with other memory segments. Invarious embodiments, segments are combined continuously, periodically,at intervals, at predetermined times, at random, in response to atrigger, on demand, and/or at any other time. Segments are combined withother segments to optimize data storage across multiple segments. Forexample, segments are combined in a background operation to optimize thememory segments by combining segments with similar sized data storagevalues. In one example, it is determined that two separate segmentsinclude data values of similar size. The two segments include useraccount balance values occupying 16 to 20 bits of storage. And based onthis determination, the two segments are combined. In another example,two segments are combined into a synthetic segment and the syntheticsegment is divided into two new segments. The synthetic segment isdivided into the two new segments such that a first new segment includeslarger data values in one or more columns and/or sub-columns and thesecond new segment includes smaller data values. Using these techniques,memory segments may be continuously optimized to increase the storagedensity while reducing the storage volume of the memory. In certaincases, segments are randomly combined and split, which may result in acoalescing of data values of similar size. Repeating these steps over aperiod of time results in a synergistic effect across multiple memorysegments.

FIG. 10 is a diagram illustrating embodiments of splitting and combiningmemory segments. In various embodiments, segments are split and combinedusing genetic algorithms, clustering approaches, heuristic approaches,random division, and/or any other approach. In the example shown,Segment A 1000 is divided into two memory segments. The two memorysegments include Segment A₁ 1010 and Segment A₂ 1020. In one example,Segment A 1000 is divided so that Segment A₁ 1010 includes a smallernumber of rows of generally larger data values and Segment A₂ 1020includes a larger number of rows of smaller data values. DividingSegment A 1000 in this manner optimizes the total required storageacross Segment A₁ 1010 and Segment A₂ 1020. In various embodiments, thesegment dividing process is repeated. For example, Segment A₁ 1010 isdivided into Segment A₁₁ 1030 and Segment A₁₂ 1040, and Segment A₂ 1020is divided into Segment A₂₁ 1050 and Segment A₂₂ 1060 using similartechniques.

In some embodiments, segments are combined and split. In one example,Segment A₁₁ 1030 and Segment A₂₁ 1050 are selected for combination, andthe two segments are combined to generate Segment A₁₁A₂₁ 1070. Incertain cases, Segment A₁₁A₂₁ 1070 is subsequently divided into multiplesegments. This process may be repeated continuously, in the background,and/or in another manner. The goals of the dividing and combiningoperations are to ensure that data is spread evenly across multiplememory segments, to coalesce large data values together in one or morememory segments, to coalesce small data values together in one or morememory segments, and/or to achieve other objectives. And the approachesused to optimally split and/or combine segments may be generated toachieve these goals.

FIG. 11A is a table illustrating embodiments of splitting memorysegments. In the example shown, a table 1100 includes a representationof data storage values included in a memory segment. The table 1100represents a memory segment including five rows of data storage valuesand associated mask sizes for three different data fields. The datavalues and mask sizes are listed in decimal (base-10) for ease ofexplanation; however, these values may be stored in binary, hexadecimal,and/or another format in an actual memory segment and/or segment layoutmap. The three different data fields include user zip code or e-zip1110, user status or e-status 1120, and/or days since receipt of surveyor k-days 1130.

In various embodiments, a clustering, heuristic, and/or other dividingapproach is used to split the segment represented in the table 1100 intotwo or more data segments. For example, the segment may be divided suchthat the memory allocated to store the data values across the twodivided memory segments is less than the memory allocation of theoriginal segment prior to division. In the segment represented in table1100, six (6) bits are allocated to each row of e-zip 1110 data storagevalues. Six (6) bits are allocated to each row because the e-zip valuein row five (5), the maximum e-zip value, requires a mask size of six(6). As a result, a total of 30 bits (five (5) rows of six (6) bits) arerequired to store the e-zip data 1110. This is inefficient because thefull six (6) bits are only required to store one value—the value 50 inrow five—while the other values could be stored using fewer bits.Similarly, four (4) bits are allocated to each row of e-status 1120 datastorage values. As such, a total of 20 bits are required to store thee-status 1120 data. And 11 bits are allocated to each row of k-days datastorage values 1130. As a result, a total of 55 bits are required tostore the k-days data 1130. This is sub-optimal because 11 bits are onlyrequired to store one value—the 1000 value in the first row—while theother four (4) k-days 1130 data values could be stored using two (2)bits. In aggregate, 105 bits are used to store the values in the memorysegment. The total bits used may be reduced by dividing the segment intomultiple segments.

FIG. 11B is a table illustrating embodiments of splitting memorysegments. In various embodiments, a segment is split by selecting afirst set of rows for inclusion in a first child memory segment,selecting a second set of rows for inclusion in a second child memorysegment, and so on up to an Nth set of rows for inclusion in an Nthchild memory segment. In the example shown, table 1150 and table 1160include representations of two memory segments generated by dividing thememory segment represented in table 1100 of FIG. 11A. In this example,the division of rows across the two memory segments is determined usinga heuristic approach in which e-zip data storage values 1110 are groupedinto a set of larger values (50 and 9) and a set of smaller values (7,6, and 1). The memory segment represented in table 1100 is then to bedivided into two segments such that the larger e-zip values 1152 areincluded in a memory segment represented by table 1150 and the smallere-zip values 1162 are included in a memory segment represented by table1160. The parent memory segment, represented by table 1100, is splitinto the two memory segments in such a way that each row remains intactafter the split.

In some embodiments, memory usage is reduced as a result of a dividingoperation. As discussed above, the memory segment pre-division (asrepresented by table 1100) used 105 bits to store the five (5) rows ofdata. After division, the total memory allocation across the two childsegments is less than that of the parent segment pre-division. Forexample, in the first child segment represented in table 1150, six (6)bits are allocated to each row of e-zip 1152 data storage values. As aresult, a total of 12 bits (two (2) rows of six (6) bits) are requiredto store the e-zip data 1152. Similarly, a total of four (4) bits arerequired to store the e-status data 1154, and a total of 22 bits arerequired to store the k-days data 1156. In sum, 38 bits are used tostore the data values in the first child memory segment represented intable 1150. In the second child segment represented in table 1160, atotal of nine (9) bits (three (3) rows of three (3) bits) are requiredto store the e-zip data 1162, a total of 12 bits are required to storethe e-status data 1164, and a total of six (6) bits are required tostore the k-days data 1166. In sum, 27 bits are used to store the datavalues in the first child memory segment represented in table 1160. Inthis example, the division of the memory segment represented in table1100 into two memory segments represented in table 1150 and table 1160results in a savings of 40 bits (105−(38+27)) and/or a 38% reduction inmemory usage.

The examples of FIGS. 11A and 11B use smaller data values for purposesof illustration. However, in some embodiments, data values can be storedonly using a fixed number of bits (e.g., 32 or 64 bits). Assuming thatthe size of a memory word is 32 bits, if an original table needed, forexample, 35 bits to be stored, this would be stored using 2×32=64 bits.But if the original table can be split into two tables, each of whichrequires less than 32 bits, the memory saving would be 50%. Or if theoriginal table can be split into two tables with an equal number ofrows, one of which requires the original 35 bits (which would be storedas 2×32=64 bits), and another which requires less than 32 bits, thememory saving would be 25%. It should be noted that the predeterminednumber of bits that is used to store an integer can be extended from 32bits or 64 bits to be any number of bits as memory technology improves.

In various embodiments, performing these techniques across multiplememory segments each including, for example, thousands of rows ofstorage values results in significant reduction of memory usage in amemory system. And this reduction leads to significant memoryperformance improvement, significant cost reduction, and/or otherbenefits.

FIG. 12 is a flowchart illustrating embodiments of a process ofsplitting a memory segment into multiple memory segments. In variousembodiments, the process 1200 is performed at server 106 of FIG. 1. At1210, a first set of rows in a memory segment is selected. In variousembodiments, it is determined that a memory segment is to be divided,for example, based on a trigger event, a determination that the segmentis full, as part of a memory optimization process, and/or another event.Upon, for example, a determination that the memory segment is to bedivided, a first set of rows in the memory segment is selected. Thefirst set of rows may be selected using, for example, a clusteringapproach, a technique similar to that described in FIGS. 11A and 11B,and/or any other approach.

At 1220, a second set of rows in the memory segment is selected. Invarious embodiments, the second set of rows is selected using the sametechniques used to select the first set of rows. In one example, thefirst set of rows includes a group of rows including larger data valuesin one or more data storage fields and/or sub-columns and the second setof rows includes a group of rows including smaller data values.

At 1230, a first memory segment is generated that includes the first setof rows. In various embodiments, a first child memory segment isgenerated by initializing an empty memory segment and copying a firstset of rows into the empty memory segment. The copy command may begenerated, compiled, and/or executed as part of the memory segmentdivision process. A segment layout map corresponding to the first memorysegment is generated using the techniques disclosed herein.

At 1240, a second memory segment is generated that includes the secondset of rows. In some embodiments, the child second memory segment isgenerated using the same techniques as used to generate the first memorysegment.

According to some embodiments, the process 1200 is not limited todividing a memory segment into two child memory segments. For example,the techniques of process 1200 may be implemented to divide a memorysegment into three or more memory segments.

Although the foregoing embodiments have been described in some detailfor purposes of clarity of understanding, the invention is not limitedto the details provided. There are many alternative ways of implementingthe invention. The disclosed embodiments are illustrative and notrestrictive.

What is claimed is:
 1. (canceled)
 2. A system, comprising: a processorconfigured to: select a first column included in an available memorysegment to store a data storage value, wherein: the first columncomprises a first sub-column that stores data of a type associated withthe data storage value; and a corresponding variable column width of thefirst sub-column is not more than a maximum allowable column widthassociated with the first column; determine that increasing a data sizeassociated with the corresponding variable column width of the firstsub-column to accommodate a size associated with the data storage valuecauses a column width of the first column to exceed the maximumallowable column width associated with the first column; and in responseto the determination, store the data storage value to a second column ofthe available memory segment that includes a second sub-column that hasa corresponding variable column width, wherein a data size associatedwith the corresponding variable column width of the second sub-columncan be increased to the size associated with the data storage value; anda memory coupled to the processor and configured to provide theprocessor with instructions.
 3. The system of claim 2, wherein the datasize associated with the corresponding variable column width of thefirst sub-column is stored as a mask value in a segment layout mapassociated with the available memory segment.
 4. The system of claim 2,wherein to increase the data size associated with the correspondingvariable column width of the first sub-column to accommodate the sizeassociated with the data storage value comprises to update a mask valueassociated with the data size associated with the corresponding variablecolumn width of the first sub-column that is stored in a segment layoutmap associated with the available memory segment.
 5. The system of claim2, wherein the processor is further configured to determine that thedata size associated with the corresponding variable column width of thesecond sub-column is to be least expanded to accommodate the data sizeassociated with the data storage value.
 6. The system of claim 2,wherein the processor is further configured to select the second columnof the available memory segment based at least in part on adetermination that the data size associated with the correspondingvariable column width of the second sub-column is to be least expandedto accommodate the data size associated with the data storage value. 7.The system of claim 2, wherein to store the data storage value comprisesto add, to the available memory segment, a row comprising the datastorage value.
 8. The system of claim 2, wherein the processor isfurther configured to update a mask value associated with the secondsub-column stored in a segment layout map associated with the availablememory segment to be at least the size associated with the data storagevalue.
 9. The system of claim 2, wherein the processor is furtherconfigured to: determine that the available memory segment is full; anddivide the available memory segment into a plurality of memory segments.10. The system of claim 2, wherein the processor is further configuredto divide the available memory segment into a plurality of memorysegments.
 11. The system of claim 10, wherein to divide the availablememory segment into the plurality of memory segments includes to:determine a first set of rows and a second set of rows included in theavailable memory segment based at least in part on clustering; anddivide the available memory segment into a plurality of memory segmentscomprising a first memory segment including the first set of rows and asecond memory segment including the second set of rows.
 12. The systemof claim 10, wherein the processor is further configured to combine afirst memory segment from the plurality of memory segments with a secondmemory segment from the plurality of memory segments.
 13. The system ofclaim 2, wherein the processor is further configured to: divide theavailable memory segment into a plurality of memory segments; andcombine a first memory segment of the plurality of memory segments witha second memory segment divided from a separate memory segment.
 14. Thesystem of claim 2, wherein to store the data storage value furthercomprises to: determine that storing the data storage value in theavailable memory segment would result in the available memory segmentfilling up; divide the available memory segment into a plurality ofmemory segments based at least in part on the determination; and storethe data storage value in one of the plurality of memory segments. 15.The system of claim 2, wherein the processor is further configured to:receive a read request including one or more of the following: a columnidentifier, a row identifier, an offset, and a mask value; and read arequested data storage value from the available memory segment based atleast in part on one or more of the column identifier, the rowidentifier, the offset, and the mask value.
 16. A method, comprising:selecting a first column included in an available memory segment tostore a data storage value, wherein: the first column comprises a firstsub-column that stores data of a type associated with the data storagevalue; and a corresponding variable column width of the first sub-columnis not more than a maximum allowable column width associated with thefirst column; determining that increasing a data size associated withthe corresponding variable column width of the first sub-column toaccommodate a size associated with the data storage value causes acolumn width of the first column to exceed the maximum allowable columnwidth associated with the first column; and in response to thedetermination, storing the data storage value to a second column of theavailable memory segment that includes a second sub-column that has acorresponding variable column width, wherein a data size associated withthe corresponding variable column width of the second sub-column can beincreased to the size associated with the data storage value.
 17. Themethod of claim 16, wherein increasing the data size associated with thecorresponding variable column width of the first sub-column toaccommodate the size associated with the data storage value comprisesupdating a mask value associated with the data size associated with thecorresponding variable column width of the first sub-column that isstored in a segment layout map associated with the available memorysegment.
 18. The method of claim 16, further comprising determining thatthe data size associated with the corresponding variable column width ofthe second sub-column is to be least expanded to accommodate the datasize associated with the data storage value.
 19. The method of claim 16,further comprising selecting the second column of the available memorysegment based at least in part on a determination that the data sizeassociated with the corresponding variable column width of the secondsub-column is to be least expanded to accommodate the data sizeassociated with the data storage value.
 20. The method of claim 16,further comprising updating a mask value associated with the secondsub-column stored in a segment layout map associated with the availablememory segment to be at least the size associated with the data storagevalue.
 21. A computer program product, the computer program productbeing embodied in a tangible non-transitory computer readable storagemedium and comprising computer instructions for: selecting a firstcolumn included in an available memory segment to store a data storagevalue, wherein: the first column comprises a first sub-column thatstores data of a type associated with the data storage value; and acorresponding variable column width of the first sub-column is not morethan a maximum allowable column width associated with the first column;determining that increasing a data size associated with thecorresponding variable column width of the first sub-column toaccommodate a size associated with the data storage value causes acolumn width of the first column to exceed the maximum allowable columnwidth associated with the first column; and in response to thedetermination, storing the data storage value to a second column of theavailable memory segment that includes a second sub-column that has acorresponding variable column width, wherein a data size associated withthe corresponding variable column width of the second sub-column can beincreased to the size associated with the data storage value.